package org.newdawn.yapgame.lwjgl;

import org.newdawn.yapgame.GameWindow;
import org.newdawn.yapgame.IResourceFactory;
import org.newdawn.yapgame.ISprite;

public class LWJGLResourceFactory implements IResourceFactory 
{
	protected LWJGLGameWindow window = null;
	
	public LWJGLResourceFactory() 
	{
	}

	@Override
	public ISprite getSprite(String ref) 
	{
	    return new LWJGLSprite( window, ref );
	}

	@Override
	public GameWindow getGameWindow() 
	{
		if( this.window == null )
		{
			this.window = new LWJGLGameWindow();
		}
		return this.window;
	}

}
